package com.example.lib_repair

import com.example.lib_common.mvi.BaseRepository
import com.example.lib_common.mvi.ResponseEntity
import com.example.lib_repair.detail.UserEntity
import com.example.network_sdk.HttpType
import com.example.network_sdk.NetWorkFactory
import kotlinx.coroutines.flow.Flow

class RepairRepository : BaseRepository() {

    fun requestAllRepair() : Flow<ResponseEntity<List<RepairEntity>>> {
        return NetWorkFactory.factory(HttpType.TOKEN)!!
            .create(ApiService::class.java)
            .requestAllRepair()
    }
    fun requestRepairUser() : Flow<ResponseEntity<List<UserEntity>>> {
        return NetWorkFactory.factory(HttpType.TOKEN)!!
            .create(ApiService::class.java)
            .requestRepairUser()
    }
}